<template>
  <div class="empty">
    <Empty :image="$props.imgType" :imgSize="$props.imgSize" :description="$props.text">
      <template v-slot:default>
        <slot></slot>
      </template>
    </Empty>
  </div>
</template>

<script setup>
import { defineProps } from 'vue';
import { Empty } from 'vant';

const props = defineProps({
  imgType: String,
  imgSize: [String, Number],
  text: {
    type: String,
    default: '暂无数据',
  },
});
</script>
<style scoped lang="less">
.empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
  :deep(.van-empty__description) {
    font-size: @size12;
  }
}
</style>
